package com.thermofisher.dsc.amanda.model.po.auth;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thermofisher.dsc.amanda.model.BaseModel;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * Created by wenjie.yang on 9/28/2018.
 */
@Slf4j
@Getter
@Setter
@Table(name = "[user]")
public class User extends BaseModel {

    @Column(name = "user_name")
    public String userName;

    @Column(name = "password")
    public String password;

    @JsonIgnore
    @Column(name = "first_name")
    public String firstName;

    @JsonIgnore
    @Column(name = "last_name")
    public String lastName;

    @Column(name = "phone_number")
    public String phoneNumber;

    @Column(name = "email_address")
    public String emailAddress;

    @Column(name = "department_id")
    private Long departmentId;

    @Transient
    private String department;

    @Column(name = "area")
    private String area;

    @Column(name = "leader_id")
    private Long leaderId;

    private List<Long> permissions;

    private List<Permission> permissionList;

    private List<Long> roles;

    private List<Role> roleList;
}
